using UnityEngine;
using System.Collections;

public class Textures : MonoBehaviour {
//public Texture[] tex = new Texture[4];
public Texture tex1,tex2, tex3, tex0;
public GameObject obj1, obj2, obj3;
	public Texture[] tex = new Texture[23];
//	public Texture bumpMap;

//	private GameObject obj;
//public GameObject[] obj = new GameObject[4];
	// Use this for initialization
	void Start () {
		obj1 = GameObject.Find("1");
		obj2 = GameObject.Find("2");
		obj3 = GameObject.Find("3");
		
/*		tex1 = GameObject.Find("a2");
		tex2 = GameObject.Find("b4");
		tex3 = GameObject.Find("b9");
*/	
//var tex : Texture = renderer.material.GetTexture ("_BumpMap");
//		tex0 = renderer.material.GetTexture("Textures/b9");
		//renderer.material.SetTexture("_BumpMap", bumpMap);
//		tex0 =(Texture) renderer.material.SetTexture("b9",bumpMap);
	}
	
	// Update is called once per frame
	void Update () {
//	GameObject.Find("1").GetComponent<Renderer>().material.mainTexture = tex;
/*		obj[0] = GameObject.Find("1");
		obj[0].renderer.material.mainTexture = tex0;
		
		obj[1] = GameObject.Find("2");
		obj[1].renderer.material.mainTexture = tex1;
		
		obj[2] = GameObject.Find("3");
		obj[2].renderer.material.mainTexture = tex2;
*/
//		GameObject obj = GameObject.Find("1");
		obj1.renderer.material.mainTexture = tex1;
		
		obj2.renderer.material.mainTexture = tex2;
		obj3.renderer.material.mainTexture = tex3;
	}
}
